<?php

use Phalcon\Mvc\Controller;

class ControllerBase extends Controller
{
    public function initialize() {
        $identity = $this->auth->getIdentity();
        if($identity){
            $user = Users::findFirstById($identity['id']);
            if(!$user){
                $this->auth->remove();
            }
        }
    }
}
